Pattern Guards and Transformational Patterns
نویسندگان
چکیده
Pattern mat hing is a well-appre iated feature of languages like ML or Haskell; it greatly simpli es the task of inspe ting values of stru tured data types and fa ilitates su in t fun tion de nitions that are easy to understand. In its basi form, pattern mat hing tries to identify a ertain stru ture of a value to be pro essed by a fun tion. This stru ture is spe i ed by a pattern, and if it an be re overed in a value, orresponding parts of the value are usually bound to variables. These bindings are exploited on the right-hand side of the de nition. There are numerous proposals for extending the apabilities of patterns and pattern mat hing; in parti ular, the problems with pattern mat hing on abstra t data types have stimulated a lot of resear h [19, 16, 3, 12, 4, 6, 11℄. Other aspe ts have also been subje t to extensions and generalisations of pattern mat hing [8, 1, 9, 7, 17℄.
منابع مشابه
Concepts and transformational knowledge.
The effect of exposure to principled change in concept formation was investigated in four experiments. In Experiment 1, participants were trained on either patterns that transformed systematically or control patterns that were distorted randomly. Training on transformational patterns produced concepts that were more resistant to false intrusions and decay. Experiment 2 separated the relative in...
متن کاملOn Static Analysis for Expressive Pattern Matching
Pattern matching is a widespread programming language construct that enables definitions of values by cases, generalizing if-thenelse and case statements. The cases in a pattern matching expression should be exhaustive: when the value does not match any of the cases, the expression throws a run-time exception. Similarly, each pattern should be reachable, and, if possible, patterns should be dis...
متن کاملParallel Join Patterns with Guards and Propagation
Join patterns are a powerful concurrency abstraction for coordinating multiple events. We extend join patterns with guards and propagation and argue that both features are essential in many programming situations. We develop a parallel execution scheme which we have fully implemented as a library in Haskell. Our results provide new insights on how to write parallel programs for multi-core archi...
متن کاملGADTs meet their match
For ML and Haskell, accurate warnings when a function definition has redundant or missing patterns are mission critical. But today’s compilers generate bogus warnings when the programmer uses guards (even simple ones), GADTs, pattern guards, or view patterns. We give the first algorithm that handles all these cases in a single, uniform framework, together with an implementation in GHC, and evid...
متن کاملGADTs meet their match ( Extended
For ML and Haskell, accurate warnings when a function definition has redundant or missing patterns are mission critical. But today’s compilers generate bogus warnings when the programmer uses guards (even simple ones), GADTs, pattern guards, or view patterns. We give the first algorithm that handles all these cases in a single, uniform framework, together with an implementation in GHC, and evid...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 41 شماره
صفحات -
تاریخ انتشار 2000